package com.neuedu.corejava.ch10test;

import java.util.LinkedList;

public class MyQueue {
	
	private LinkedList store=new LinkedList();
	
	public void put(Object object) {
		store.add(object);
	}
	
	public Object get() {
		Object object=null;
		if(!store.isEmpty()) {
			object=store.pollFirst();
		}
		return object;
	}
	public boolean isEmpty() {
		return store.isEmpty();
		
	}
	public static void main(String[] args) {
		MyQueue myQueue=new MyQueue();
		for(int i=0;i<10;i++) {
			myQueue.put("jiang "+i);
		}
		Object object=null;
		while((object=myQueue.get())!=null) {
			System.out.println(object);
		}
	}

}
